const app = {
  state: {
    sidebar: false,
    device: 'desktop',
    open: false,
    openAside: false
  },
  mutations: {
    TOGGLE_SIDEBAR: (state, status) => {
      state.sidebar = status
    },
    DEVICE_CHANGE: (state, device) => {
      state.device = device
    },
    OPEN_SIDEBAR: (state, status) => {
      state.open = status
    },
    OPEN_ASIDEBAR: (state, status) => {
      state.openAside = status
    }
  },
  actions: {
    ToggleSideBar: ({ commit }, status) => {
      commit('TOGGLE_SIDEBAR', status)
    },
    DeviceChange({ commit }, device) {
      commit('DEVICE_CHANGE', device)
    },
    OpenNavBar({ commit }, status) {
      commit('OPEN_SIDEBAR', status)
    },
    OpenAsideBar({ commit }, status) {
      commit('OPEN_ASIDEBAR', status)
    }
  }
}

export default app
